<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/vue.js"></script>

</head>

<body>
    <div id="box">
        {{name+'-aaaaa'}} {{isLogin?'登录了':'未登录'}} {{name.slice(0,3)}}

        <!-- 但是不支持语句如for,if,var等。 -->


    </div>
    <script>
        var obj = {
            data() {
                return {
                    name: '张三',
                    isLogin: false

                }
            }
        }

        Vue.createApp(obj).mount('#box')
    </script>
</body>

</html>